import { post } from '@/api/http'

// 获取系统参数
export const getSysParams = (data) => post({ url: '/dict/getInfo', data })

// 导入后状态查询
export const getImportResult = (data) => post({ url: '/importExport/getImportTask', data })

// 下载导入失败记录的文件
export const downloadFailFile = (data) => {
  window.open(import.meta.env.VITE_BASE_PATH + `/download/importTaskFile?id=${data.id}&type=2`)
}

// 获取图片base64内容
export const getImageBase64 = (data) => post({ url: '/uploadFile/getImageBase64', data })

// 上传图片以base64形式
export const uploadImageBase64 = (data) => post({ url: '/uploadFile/uploadImageBase64', data })

// 按文件idList获取文件信息
export const getFileInfoList = (data) => post({ url: '/uploadFile/getFileInfoList', data })

// 按文件id获取文件信息
export const getFileInfo = (data) => post({ url: '/uploadFile/getFileInfo', data })

// 省市二级下拉列表
export const getProvinceCityList = (data) => post({ url: '/area/findAreaSelect', data })

// 操作日志
export const getOperateLog = (data) => post({ url: '/bizOperateLog/getList', data })

// 消息记录
export const getMsgList = (data) => post({ url: '/notice/userList', data })

// 消息全部已读
export const readAllMsg = (data) => post({ url: '/notice/readAll', data })

// 消息一条已读
export const readMsg = (data) => post({ url: '/notice/read', data })

// 消息详情（上一条下一条）
export const getMsgDetail = (data) => post({ url: '/notice/userNoticeDetail', data })

// 获取长连接凭证
export const getWsTicket = (data) => post({ url: '/index/getWsTicket', data })

// 获取收款码
export const getPayCode = (data) => post({ url: '/thirdPaymentBill/detail', data })

// 获取支付状态
export const getPayStatus = (data) => post({ url: '/pay/getPayResult', data })

// 获取第三方支付账单
export const getThirdPayBill = (data) => post({ url: '/thirdPaymentBill/queryByRefIdAndType', data })

// 取消付款
export const cancelPay = (data) => post({ url: '/thirdPaymentBill/cancelPay', data })

// 获取二维码信息
export const queryScanCode = (data) => post({ url: '/thirdPaymentBill/queryScanCode', data })
